<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="utf-8">
  	<meta http-equiv="X-UA-Compatible" content="IE=edge">
  	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
	<title>欢迎访问管理页面</title>
	 <link rel="stylesheet" href="lib/bootstrap/css/bootstrap.css">
	<style type="text/css">
		body {
			font-family: Microsoft YaHei ;
			color: #333;
			background-color: #fff;
		}
		.total{
			width: 300px;
			height: 172px;
			background-color: #696969;
			border-radius: 5px;
			margin: 100px auto;
			/*background:url(image/1_2.jpg) repeat 0px 0px*/

		}
		.total:hover {
			box-shadow: 0 15px 30px rgba(0,0,0,0.1);
		}
		.title{
			text-align: center;
			line-height: 66px;
			font-weight: 700;
		}
		.name{
			text-align: center;
			line-height: 10px;
			font-weight: 700;
		}
		.pwd{
			text-align: center;
			line-height: 10px;
			font-weight: 700;
		}
		.login_btn{			
			line-height: 45px;
			font-weight: 700;
			width: 80px;
			padding-left: 125px ;

		}
		.my_input{
			background-color:transparent;border:0;border-bottom:1px solid #ddd;
		}
	</style>
</head>
<body>
	<div class="total">
		<div class="title">
			管理员登陆
		</div>
		<div class="name" id="username">
			<span>用户名：</span><input type="text" class="my_input" name="">
		</div>
		<div class="pwd" id="password">
			<span>密码：</span> &nbsp;&nbsp;<input type="password" class="my_input" name="">
		</div>
		<div class="login_btn">
			<button id="login" type="button" class="btn btn-info">登陆</button>
		</div>
	</div>

	<script type="text/javascript" src="lib/jquery/jquery.js"></script>
	<script type="text/javascript">
		$(function(){
        //按钮单击时执行
        $("#login").click(function(){
        	// alert("张星你好！")

        	$.ajax({
             type: "GET",
             url: "http://127.0.0.1:8000/index/",
             //data: {username:$("#username").val(), content:$("#password").val()},
             dataType: "json",
             success: function(data){
             			alert(data.msg);
             			if (data.msg == "success") {

             				window.location.href='admin.html';
             			}
             			// 
                        
                      }
         			});
   			 });
        
    	});
	</script>
</body>
</html>